<?php
class IndexAction extends Action {
    public function index(){
        init($this);
        $this->SourcePage       = 'https://code.google.com/p/homeworksystem/';
        $this->MenuSelected     = 'Home';
        $this->display();
    }
    public function home(){
        init($this);
        $this->SourcePage       = 'https://code.google.com/p/homeworksystem/';
        $this->MenuSelected     = 'Home';
        if ($this->UserLevel == 1) {
            // display the amount of problems left
            // $model = new Model();
            // $res = $model->table("problem")
            //              ->join("answer on answer.ProId=problem.ProId")
            //              ->join("user on user.UserId=answer.UserId")
            //              ->field("count(*)")
            //              ->group("problem.ProId")
            //              ->where("user.UserId=".$this->UserId)
            //              ->select();

        }
        else if ($this->UserLevel == 2) {

        }
        else if ($this->UserLevel == 3) {
            // add last login
            $this->notes = "Please check the system, good luck, my master.";
        }
        $this->display();
    }
}
?>
